function [C,matAtilde] = merge_skeletons(kh,C1,matP1,C2,matP2)

n1 = size(C1,2);
n2 = size(C2,2);
n  = n1+n2;

C = [C1,C2];

matA12tilde = get_A_offd_noquad(C,1:n1,(n1+1):n,kh);
matA21tilde = get_A_offd_noquad(C,(n1+1):n,1:n1,kh);

matAtilde = [inv(matP1),matA12tilde;...
             matA21tilde,inv(matP2)];



return